#pragma once

class MyConfig
{
private:
	CString host;
	CString user;
	CString pass;

	char * w2s(CString);

public:
	MyConfig(CString h, CString u, CString p);
	~MyConfig(void);
	
	MYSQL_RES   *DBQuery(CString sql);
	MYSQL_ROW FetchValue(MYSQL_RES   *res);
	int NumFields(MYSQL_RES   *res);
	BOOL open();

	MYSQL* ConnectSQL(CString h, CString u, CString p);
	MYSQL* ConnectSQL();
	MYSQL* db;

};

